#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include <QDir>
#include <QListWidget>
#include <QListWidgetItem>
#include "QImageProcessScene.h"
#include "QImageProcessView.h"
#include "CHardwareFacade.h"
#include "CFileSystem.h"
#include "CDevice.h"
#include "customSplashScreen.h"

typedef QList<CDevice>                   device_list_t;

namespace Ui {
    class Dialog;
}

class Dialog : public QDialog {
    Q_OBJECT
public:
    Dialog(CSplashScreen* aSplashScreen, QWidget *parent = 0);
    ~Dialog();

public:
    QImageProcessScene  *m_GraphicsScene;
    QImageProcessView   *m_GraphicsView;
    CHardwareFacade     *m_currentEdittedHWFacade;
    CFileSystem         *m_currentEdittedFileSystem;

protected:
    void changeEvent(QEvent *e);

private:
    Ui::Dialog      *ui;
    QDir            m_currentDir;
    device_list_t   m_deviceList;

private:
    void UpdateDeviceList ( void );

private slots:
    void on_fileList_cellClicked(int row, int column);
    void on_DeleteButton_clicked();
    void on_SyncButton_clicked();
    void on_loadPictureButton_clicked();
    void on_deviceList_clicked(const QModelIndex &index);
    void on_deviceList_doubleClicked(const QModelIndex &index);
    void on_deviceList_itemChanged(QListWidgetItem *item);
};

#endif // DIALOG_H
